//
// Created by alexander on 14.03.18.
//
#include <Eigen/Dense>
#include <Eigen/src/Core/Matrix.h>

void build_C_mat(const Eigen::MatrixXd& A, Eigen::MatrixXd& C)
{
    C = Eigen::MatrixXd(6,9);
    C(0,0) = A(0,1)*((A(3,1)*A(3,1)) - A(0,1)*A(1,1)) + A(1,1)*((A(3,2)*A(3,2)) - A(0,2)*A(1,2)) + A(2,1)*((A(3,3)*A(3,3)) - A(0,3)*A(1,3)) - A(3,1)*(A(0,1)*A(1,2) + A(0,2)*A(1,1) - 2*A(3,1)*A(3,2)) - A(4,1)*(A(0,1)*A(1,3) + A(0,3)*A(1,1) - 2*A(3,1)*A(3,3)) - A(5,1)*(A(0,2)*A(1,3) + A(0,3)*A(1,2) - 2*A(3,2)*A(3,3)) - A(0,0)*A(1,1) - A(0,1)*A(1,0) + 2*A(3,0)*A(3,1);
    C(0,1) = 2*A(3,1)*A(3,4) - A(0,4)*A(1,1) - A(0,1)*A(1,4);
    C(0,2) = A(0,2)*((A(3,1)*A(3,1)) - A(0,1)*A(1,1)) + A(1,2)*((A(3,2)*A(3,2)) - A(0,2)*A(1,2)) + A(2,2)*((A(3,3)*A(3,3)) - A(0,3)*A(1,3)) - A(3,2)*(A(0,1)*A(1,2) + A(0,2)*A(1,1) - 2*A(3,1)*A(3,2)) - A(4,2)*(A(0,1)*A(1,3) + A(0,3)*A(1,1) - 2*A(3,1)*A(3,3)) - A(5,2)*(A(0,2)*A(1,3) + A(0,3)*A(1,2) - 2*A(3,2)*A(3,3)) - A(0,0)*A(1,2) - A(0,2)*A(1,0) + 2*A(3,0)*A(3,2);
    C(0,3) = 2*A(3,2)*A(3,4) - A(0,4)*A(1,2) - A(0,2)*A(1,4);
    C(0,4) = A(0,3)*((A(3,1)*A(3,1)) - A(0,1)*A(1,1)) + A(1,3)*((A(3,2)*A(3,2)) - A(0,2)*A(1,2)) + A(2,3)*((A(3,3)*A(3,3)) - A(0,3)*A(1,3)) - A(3,3)*(A(0,1)*A(1,2) + A(0,2)*A(1,1) - 2*A(3,1)*A(3,2)) - A(4,3)*(A(0,1)*A(1,3) + A(0,3)*A(1,1) - 2*A(3,1)*A(3,3)) - A(5,3)*(A(0,2)*A(1,3) + A(0,3)*A(1,2) - 2*A(3,2)*A(3,3)) - A(0,0)*A(1,3) - A(0,3)*A(1,0) + 2*A(3,0)*A(3,3);
    C(0,5) = 2*A(3,3)*A(3,4) - A(0,4)*A(1,3) - A(0,3)*A(1,4);
    C(0,6) = A(0,0)*((A(3,1)*A(3,1)) - A(0,1)*A(1,1)) + A(1,0)*((A(3,2)*A(3,2)) - A(0,2)*A(1,2)) + A(2,0)*((A(3,3)*A(3,3)) - A(0,3)*A(1,3)) + (A(3,0)*A(3,0)) - A(3,0)*(A(0,1)*A(1,2) + A(0,2)*A(1,1) - 2*A(3,1)*A(3,2)) - A(4,0)*(A(0,1)*A(1,3) + A(0,3)*A(1,1) - 2*A(3,1)*A(3,3)) - A(5,0)*(A(0,2)*A(1,3) + A(0,3)*A(1,2) - 2*A(3,2)*A(3,3)) - A(0,0)*A(1,0);
    C(0,7) = A(0,4)*((A(3,1)*A(3,1)) - A(0,1)*A(1,1)) + A(1,4)*((A(3,2)*A(3,2)) - A(0,2)*A(1,2)) + A(2,4)*((A(3,3)*A(3,3)) - A(0,3)*A(1,3)) - A(3,4)*(A(0,1)*A(1,2) + A(0,2)*A(1,1) - 2*A(3,1)*A(3,2)) - A(4,4)*(A(0,1)*A(1,3) + A(0,3)*A(1,1) - 2*A(3,1)*A(3,3)) - A(5,4)*(A(0,2)*A(1,3) + A(0,3)*A(1,2) - 2*A(3,2)*A(3,3)) - A(0,0)*A(1,4) - A(0,4)*A(1,0) + 2*A(3,0)*A(3,4);
    C(0,8) = (A(3,4)*A(3,4)) - A(0,4)*A(1,4);
    C(1,0) = A(0,1)*((A(4,1)*A(4,1)) - A(0,1)*A(2,1)) + A(1,1)*((A(4,2)*A(4,2)) - A(0,2)*A(2,2)) + A(2,1)*((A(4,3)*A(4,3)) - A(0,3)*A(2,3)) - A(3,1)*(A(0,1)*A(2,2) + A(0,2)*A(2,1) - 2*A(4,1)*A(4,2)) - A(4,1)*(A(0,1)*A(2,3) + A(0,3)*A(2,1) - 2*A(4,1)*A(4,3)) - A(5,1)*(A(0,2)*A(2,3) + A(0,3)*A(2,2) - 2*A(4,2)*A(4,3)) - A(0,0)*A(2,1) - A(0,1)*A(2,0) + 2*A(4,0)*A(4,1);
    C(1,1) = 2*A(4,1)*A(4,4) - A(0,4)*A(2,1) - A(0,1)*A(2,4);
    C(1,2) = A(0,2)*((A(4,1)*A(4,1)) - A(0,1)*A(2,1)) + A(1,2)*((A(4,2)*A(4,2)) - A(0,2)*A(2,2)) + A(2,2)*((A(4,3)*A(4,3)) - A(0,3)*A(2,3)) - A(3,2)*(A(0,1)*A(2,2) + A(0,2)*A(2,1) - 2*A(4,1)*A(4,2)) - A(4,2)*(A(0,1)*A(2,3) + A(0,3)*A(2,1) - 2*A(4,1)*A(4,3)) - A(5,2)*(A(0,2)*A(2,3) + A(0,3)*A(2,2) - 2*A(4,2)*A(4,3)) - A(0,0)*A(2,2) - A(0,2)*A(2,0) + 2*A(4,0)*A(4,2);
    C(1,3) = 2*A(4,2)*A(4,4) - A(0,4)*A(2,2) - A(0,2)*A(2,4);
    C(1,4) = A(0,3)*((A(4,1)*A(4,1)) - A(0,1)*A(2,1)) + A(1,3)*((A(4,2)*A(4,2)) - A(0,2)*A(2,2)) + A(2,3)*((A(4,3)*A(4,3)) - A(0,3)*A(2,3)) - A(3,3)*(A(0,1)*A(2,2) + A(0,2)*A(2,1) - 2*A(4,1)*A(4,2)) - A(4,3)*(A(0,1)*A(2,3) + A(0,3)*A(2,1) - 2*A(4,1)*A(4,3)) - A(5,3)*(A(0,2)*A(2,3) + A(0,3)*A(2,2) - 2*A(4,2)*A(4,3)) - A(0,0)*A(2,3) - A(0,3)*A(2,0) + 2*A(4,0)*A(4,3);
    C(1,5) = 2*A(4,3)*A(4,4) - A(0,4)*A(2,3) - A(0,3)*A(2,4);
    C(1,6) = A(0,0)*((A(4,1)*A(4,1)) - A(0,1)*A(2,1)) + A(1,0)*((A(4,2)*A(4,2)) - A(0,2)*A(2,2)) + A(2,0)*((A(4,3)*A(4,3)) - A(0,3)*A(2,3)) + (A(4,0)*A(4,0)) - A(3,0)*(A(0,1)*A(2,2) + A(0,2)*A(2,1) - 2*A(4,1)*A(4,2)) - A(4,0)*(A(0,1)*A(2,3) + A(0,3)*A(2,1) - 2*A(4,1)*A(4,3)) - A(5,0)*(A(0,2)*A(2,3) + A(0,3)*A(2,2) - 2*A(4,2)*A(4,3)) - A(0,0)*A(2,0);
    C(1,7) = A(0,4)*((A(4,1)*A(4,1)) - A(0,1)*A(2,1)) + A(1,4)*((A(4,2)*A(4,2)) - A(0,2)*A(2,2)) + A(2,4)*((A(4,3)*A(4,3)) - A(0,3)*A(2,3)) - A(3,4)*(A(0,1)*A(2,2) + A(0,2)*A(2,1) - 2*A(4,1)*A(4,2)) - A(4,4)*(A(0,1)*A(2,3) + A(0,3)*A(2,1) - 2*A(4,1)*A(4,3)) - A(5,4)*(A(0,2)*A(2,3) + A(0,3)*A(2,2) - 2*A(4,2)*A(4,3)) - A(0,0)*A(2,4) - A(0,4)*A(2,0) + 2*A(4,0)*A(4,4);
    C(1,8) = (A(4,4)*A(4,4)) - A(0,4)*A(2,4);
    C(2,0) = A(0,1)*((A(5,1)*A(5,1)) - A(1,1)*A(2,1)) + A(1,1)*((A(5,2)*A(5,2)) - A(1,2)*A(2,2)) + A(2,1)*((A(5,3)*A(5,3)) - A(1,3)*A(2,3)) - A(3,1)*(A(1,1)*A(2,2) + A(1,2)*A(2,1) - 2*A(5,1)*A(5,2)) - A(4,1)*(A(1,1)*A(2,3) + A(1,3)*A(2,1) - 2*A(5,1)*A(5,3)) - A(5,1)*(A(1,2)*A(2,3) + A(1,3)*A(2,2) - 2*A(5,2)*A(5,3)) - A(1,0)*A(2,1) - A(1,1)*A(2,0) + 2*A(5,0)*A(5,1);
    C(2,1) = 2*A(5,1)*A(5,4) - A(1,4)*A(2,1) - A(1,1)*A(2,4);
    C(2,2) = A(0,2)*((A(5,1)*A(5,1)) - A(1,1)*A(2,1)) + A(1,2)*((A(5,2)*A(5,2)) - A(1,2)*A(2,2)) + A(2,2)*((A(5,3)*A(5,3)) - A(1,3)*A(2,3)) - A(3,2)*(A(1,1)*A(2,2) + A(1,2)*A(2,1) - 2*A(5,1)*A(5,2)) - A(4,2)*(A(1,1)*A(2,3) + A(1,3)*A(2,1) - 2*A(5,1)*A(5,3)) - A(5,2)*(A(1,2)*A(2,3) + A(1,3)*A(2,2) - 2*A(5,2)*A(5,3)) - A(1,0)*A(2,2) - A(1,2)*A(2,0) + 2*A(5,0)*A(5,2);
    C(2,3) = 2*A(5,2)*A(5,4) - A(1,4)*A(2,2) - A(1,2)*A(2,4);
    C(2,4) = A(0,3)*((A(5,1)*A(5,1)) - A(1,1)*A(2,1)) + A(1,3)*((A(5,2)*A(5,2)) - A(1,2)*A(2,2)) + A(2,3)*((A(5,3)*A(5,3)) - A(1,3)*A(2,3)) - A(3,3)*(A(1,1)*A(2,2) + A(1,2)*A(2,1) - 2*A(5,1)*A(5,2)) - A(4,3)*(A(1,1)*A(2,3) + A(1,3)*A(2,1) - 2*A(5,1)*A(5,3)) - A(5,3)*(A(1,2)*A(2,3) + A(1,3)*A(2,2) - 2*A(5,2)*A(5,3)) - A(1,0)*A(2,3) - A(1,3)*A(2,0) + 2*A(5,0)*A(5,3);
    C(2,5) = 2*A(5,3)*A(5,4) - A(1,4)*A(2,3) - A(1,3)*A(2,4);
    C(2,6) = A(0,0)*((A(5,1)*A(5,1)) - A(1,1)*A(2,1)) + A(1,0)*((A(5,2)*A(5,2)) - A(1,2)*A(2,2)) + A(2,0)*((A(5,3)*A(5,3)) - A(1,3)*A(2,3)) + (A(5,0)*A(5,0)) - A(3,0)*(A(1,1)*A(2,2) + A(1,2)*A(2,1) - 2*A(5,1)*A(5,2)) - A(4,0)*(A(1,1)*A(2,3) + A(1,3)*A(2,1) - 2*A(5,1)*A(5,3)) - A(5,0)*(A(1,2)*A(2,3) + A(1,3)*A(2,2) - 2*A(5,2)*A(5,3)) - A(1,0)*A(2,0);
    C(2,7) = A(0,4)*((A(5,1)*A(5,1)) - A(1,1)*A(2,1)) + A(1,4)*((A(5,2)*A(5,2)) - A(1,2)*A(2,2)) + A(2,4)*((A(5,3)*A(5,3)) - A(1,3)*A(2,3)) - A(3,4)*(A(1,1)*A(2,2) + A(1,2)*A(2,1) - 2*A(5,1)*A(5,2)) - A(4,4)*(A(1,1)*A(2,3) + A(1,3)*A(2,1) - 2*A(5,1)*A(5,3)) - A(5,4)*(A(1,2)*A(2,3) + A(1,3)*A(2,2) - 2*A(5,2)*A(5,3)) - A(1,0)*A(2,4) - A(1,4)*A(2,0) + 2*A(5,0)*A(5,4);
    C(2,8) = (A(5,4)*A(5,4)) - A(1,4)*A(2,4);
    C(3,0) = A(3,0)*A(4,1) - A(4,1)*(A(0,1)*A(5,3) + A(0,3)*A(5,1) - A(3,1)*A(4,3) - A(3,3)*A(4,1)) - A(5,1)*(A(0,2)*A(5,3) + A(0,3)*A(5,2) - A(3,2)*A(4,3) - A(3,3)*A(4,2)) - A(0,1)*(A(0,1)*A(5,1) - A(3,1)*A(4,1)) - A(1,1)*(A(0,2)*A(5,2) - A(3,2)*A(4,2)) - A(2,1)*(A(0,3)*A(5,3) - A(3,3)*A(4,3)) - A(0,0)*A(5,1) - A(0,1)*A(5,0) - A(3,1)*(A(0,1)*A(5,2) + A(0,2)*A(5,1) - A(3,1)*A(4,2) - A(3,2)*A(4,1)) + A(3,1)*A(4,0);
    C(3,1) = A(3,1)*A(4,4) - A(0,4)*A(5,1) - A(0,1)*A(5,4) + A(3,4)*A(4,1);
    C(3,2) = A(3,0)*A(4,2) - A(4,2)*(A(0,1)*A(5,3) + A(0,3)*A(5,1) - A(3,1)*A(4,3) - A(3,3)*A(4,1)) - A(5,2)*(A(0,2)*A(5,3) + A(0,3)*A(5,2) - A(3,2)*A(4,3) - A(3,3)*A(4,2)) - A(0,2)*(A(0,1)*A(5,1) - A(3,1)*A(4,1)) - A(1,2)*(A(0,2)*A(5,2) - A(3,2)*A(4,2)) - A(2,2)*(A(0,3)*A(5,3) - A(3,3)*A(4,3)) - A(0,0)*A(5,2) - A(0,2)*A(5,0) - A(3,2)*(A(0,1)*A(5,2) + A(0,2)*A(5,1) - A(3,1)*A(4,2) - A(3,2)*A(4,1)) + A(3,2)*A(4,0);
    C(3,3) = A(3,2)*A(4,4) - A(0,4)*A(5,2) - A(0,2)*A(5,4) + A(3,4)*A(4,2);
    C(3,4) = A(3,0)*A(4,3) - A(4,3)*(A(0,1)*A(5,3) + A(0,3)*A(5,1) - A(3,1)*A(4,3) - A(3,3)*A(4,1)) - A(5,3)*(A(0,2)*A(5,3) + A(0,3)*A(5,2) - A(3,2)*A(4,3) - A(3,3)*A(4,2)) - A(0,3)*(A(0,1)*A(5,1) - A(3,1)*A(4,1)) - A(1,3)*(A(0,2)*A(5,2) - A(3,2)*A(4,2)) - A(2,3)*(A(0,3)*A(5,3) - A(3,3)*A(4,3)) - A(0,0)*A(5,3) - A(0,3)*A(5,0) - A(3,3)*(A(0,1)*A(5,2) + A(0,2)*A(5,1) - A(3,1)*A(4,2) - A(3,2)*A(4,1)) + A(3,3)*A(4,0);
    C(3,5) = A(3,3)*A(4,4) - A(0,4)*A(5,3) - A(0,3)*A(5,4) + A(3,4)*A(4,3);
    C(3,6) = A(3,0)*A(4,0) - A(4,0)*(A(0,1)*A(5,3) + A(0,3)*A(5,1) - A(3,1)*A(4,3) - A(3,3)*A(4,1)) - A(5,0)*(A(0,2)*A(5,3) + A(0,3)*A(5,2) - A(3,2)*A(4,3) - A(3,3)*A(4,2)) - A(0,0)*(A(0,1)*A(5,1) - A(3,1)*A(4,1)) - A(1,0)*(A(0,2)*A(5,2) - A(3,2)*A(4,2)) - A(2,0)*(A(0,3)*A(5,3) - A(3,3)*A(4,3)) - A(0,0)*A(5,0) - A(3,0)*(A(0,1)*A(5,2) + A(0,2)*A(5,1) - A(3,1)*A(4,2) - A(3,2)*A(4,1));
    C(3,7) = A(3,0)*A(4,4) - A(4,4)*(A(0,1)*A(5,3) + A(0,3)*A(5,1) - A(3,1)*A(4,3) - A(3,3)*A(4,1)) - A(5,4)*(A(0,2)*A(5,3) + A(0,3)*A(5,2) - A(3,2)*A(4,3) - A(3,3)*A(4,2)) - A(0,4)*(A(0,1)*A(5,1) - A(3,1)*A(4,1)) - A(1,4)*(A(0,2)*A(5,2) - A(3,2)*A(4,2)) - A(2,4)*(A(0,3)*A(5,3) - A(3,3)*A(4,3)) - A(0,0)*A(5,4) - A(0,4)*A(5,0) - A(3,4)*(A(0,1)*A(5,2) + A(0,2)*A(5,1) - A(3,1)*A(4,2) - A(3,2)*A(4,1)) + A(3,4)*A(4,0);
    C(3,8) = A(3,4)*A(4,4) - A(0,4)*A(5,4);
    C(4,0) = A(3,0)*A(5,1) - A(4,1)*(A(1,1)*A(4,3) + A(1,3)*A(4,1) - A(3,1)*A(5,3) - A(3,3)*A(5,1)) - A(5,1)*(A(1,2)*A(4,3) + A(1,3)*A(4,2) - A(3,2)*A(5,3) - A(3,3)*A(5,2)) - A(0,1)*(A(1,1)*A(4,1) - A(3,1)*A(5,1)) - A(1,1)*(A(1,2)*A(4,2) - A(3,2)*A(5,2)) - A(2,1)*(A(1,3)*A(4,3) - A(3,3)*A(5,3)) - A(1,0)*A(4,1) - A(1,1)*A(4,0) - A(3,1)*(A(1,1)*A(4,2) + A(1,2)*A(4,1) - A(3,1)*A(5,2) - A(3,2)*A(5,1)) + A(3,1)*A(5,0);
    C(4,1) = A(3,1)*A(5,4) - A(1,4)*A(4,1) - A(1,1)*A(4,4) + A(3,4)*A(5,1);
    C(4,2) = A(3,0)*A(5,2) - A(4,2)*(A(1,1)*A(4,3) + A(1,3)*A(4,1) - A(3,1)*A(5,3) - A(3,3)*A(5,1)) - A(5,2)*(A(1,2)*A(4,3) + A(1,3)*A(4,2) - A(3,2)*A(5,3) - A(3,3)*A(5,2)) - A(0,2)*(A(1,1)*A(4,1) - A(3,1)*A(5,1)) - A(1,2)*(A(1,2)*A(4,2) - A(3,2)*A(5,2)) - A(2,2)*(A(1,3)*A(4,3) - A(3,3)*A(5,3)) - A(1,0)*A(4,2) - A(1,2)*A(4,0) - A(3,2)*(A(1,1)*A(4,2) + A(1,2)*A(4,1) - A(3,1)*A(5,2) - A(3,2)*A(5,1)) + A(3,2)*A(5,0);
    C(4,3) = A(3,2)*A(5,4) - A(1,4)*A(4,2) - A(1,2)*A(4,4) + A(3,4)*A(5,2);
    C(4,4) = A(3,0)*A(5,3) - A(4,3)*(A(1,1)*A(4,3) + A(1,3)*A(4,1) - A(3,1)*A(5,3) - A(3,3)*A(5,1)) - A(5,3)*(A(1,2)*A(4,3) + A(1,3)*A(4,2) - A(3,2)*A(5,3) - A(3,3)*A(5,2)) - A(0,3)*(A(1,1)*A(4,1) - A(3,1)*A(5,1)) - A(1,3)*(A(1,2)*A(4,2) - A(3,2)*A(5,2)) - A(2,3)*(A(1,3)*A(4,3) - A(3,3)*A(5,3)) - A(1,0)*A(4,3) - A(1,3)*A(4,0) - A(3,3)*(A(1,1)*A(4,2) + A(1,2)*A(4,1) - A(3,1)*A(5,2) - A(3,2)*A(5,1)) + A(3,3)*A(5,0);
    C(4,5) = A(3,3)*A(5,4) - A(1,4)*A(4,3) - A(1,3)*A(4,4) + A(3,4)*A(5,3);
    C(4,6) = A(3,0)*A(5,0) - A(4,0)*(A(1,1)*A(4,3) + A(1,3)*A(4,1) - A(3,1)*A(5,3) - A(3,3)*A(5,1)) - A(5,0)*(A(1,2)*A(4,3) + A(1,3)*A(4,2) - A(3,2)*A(5,3) - A(3,3)*A(5,2)) - A(0,0)*(A(1,1)*A(4,1) - A(3,1)*A(5,1)) - A(1,0)*(A(1,2)*A(4,2) - A(3,2)*A(5,2)) - A(2,0)*(A(1,3)*A(4,3) - A(3,3)*A(5,3)) - A(1,0)*A(4,0) - A(3,0)*(A(1,1)*A(4,2) + A(1,2)*A(4,1) - A(3,1)*A(5,2) - A(3,2)*A(5,1));
    C(4,7) = A(3,0)*A(5,4) - A(4,4)*(A(1,1)*A(4,3) + A(1,3)*A(4,1) - A(3,1)*A(5,3) - A(3,3)*A(5,1)) - A(5,4)*(A(1,2)*A(4,3) + A(1,3)*A(4,2) - A(3,2)*A(5,3) - A(3,3)*A(5,2)) - A(0,4)*(A(1,1)*A(4,1) - A(3,1)*A(5,1)) - A(1,4)*(A(1,2)*A(4,2) - A(3,2)*A(5,2)) - A(2,4)*(A(1,3)*A(4,3) - A(3,3)*A(5,3)) - A(1,0)*A(4,4) - A(1,4)*A(4,0) - A(3,4)*(A(1,1)*A(4,2) + A(1,2)*A(4,1) - A(3,1)*A(5,2) - A(3,2)*A(5,1)) + A(3,4)*A(5,0);
    C(4,8) = A(3,4)*A(5,4) - A(1,4)*A(4,4);
    C(5,0) = A(4,0)*A(5,1) - A(4,1)*(A(2,1)*A(3,3) + A(2,3)*A(3,1) - A(4,1)*A(5,3) - A(4,3)*A(5,1)) - A(5,1)*(A(2,2)*A(3,3) + A(2,3)*A(3,2) - A(4,2)*A(5,3) - A(4,3)*A(5,2)) - A(0,1)*(A(2,1)*A(3,1) - A(4,1)*A(5,1)) - A(1,1)*(A(2,2)*A(3,2) - A(4,2)*A(5,2)) - A(2,1)*(A(2,3)*A(3,3) - A(4,3)*A(5,3)) - A(2,0)*A(3,1) - A(2,1)*A(3,0) - A(3,1)*(A(2,1)*A(3,2) + A(2,2)*A(3,1) - A(4,1)*A(5,2) - A(4,2)*A(5,1)) + A(4,1)*A(5,0);
    C(5,1) = A(4,1)*A(5,4) - A(2,4)*A(3,1) - A(2,1)*A(3,4) + A(4,4)*A(5,1);
    C(5,2) = A(4,0)*A(5,2) - A(4,2)*(A(2,1)*A(3,3) + A(2,3)*A(3,1) - A(4,1)*A(5,3) - A(4,3)*A(5,1)) - A(5,2)*(A(2,2)*A(3,3) + A(2,3)*A(3,2) - A(4,2)*A(5,3) - A(4,3)*A(5,2)) - A(0,2)*(A(2,1)*A(3,1) - A(4,1)*A(5,1)) - A(1,2)*(A(2,2)*A(3,2) - A(4,2)*A(5,2)) - A(2,2)*(A(2,3)*A(3,3) - A(4,3)*A(5,3)) - A(2,0)*A(3,2) - A(2,2)*A(3,0) - A(3,2)*(A(2,1)*A(3,2) + A(2,2)*A(3,1) - A(4,1)*A(5,2) - A(4,2)*A(5,1)) + A(4,2)*A(5,0);
    C(5,3) = A(4,2)*A(5,4) - A(2,4)*A(3,2) - A(2,2)*A(3,4) + A(4,4)*A(5,2);
    C(5,4) = A(4,0)*A(5,3) - A(4,3)*(A(2,1)*A(3,3) + A(2,3)*A(3,1) - A(4,1)*A(5,3) - A(4,3)*A(5,1)) - A(5,3)*(A(2,2)*A(3,3) + A(2,3)*A(3,2) - A(4,2)*A(5,3) - A(4,3)*A(5,2)) - A(0,3)*(A(2,1)*A(3,1) - A(4,1)*A(5,1)) - A(1,3)*(A(2,2)*A(3,2) - A(4,2)*A(5,2)) - A(2,3)*(A(2,3)*A(3,3) - A(4,3)*A(5,3)) - A(2,0)*A(3,3) - A(2,3)*A(3,0) - A(3,3)*(A(2,1)*A(3,2) + A(2,2)*A(3,1) - A(4,1)*A(5,2) - A(4,2)*A(5,1)) + A(4,3)*A(5,0);
    C(5,5) = A(4,3)*A(5,4) - A(2,4)*A(3,3) - A(2,3)*A(3,4) + A(4,4)*A(5,3);
    C(5,6) = A(4,0)*A(5,0) - A(4,0)*(A(2,1)*A(3,3) + A(2,3)*A(3,1) - A(4,1)*A(5,3) - A(4,3)*A(5,1)) - A(5,0)*(A(2,2)*A(3,3) + A(2,3)*A(3,2) - A(4,2)*A(5,3) - A(4,3)*A(5,2)) - A(0,0)*(A(2,1)*A(3,1) - A(4,1)*A(5,1)) - A(1,0)*(A(2,2)*A(3,2) - A(4,2)*A(5,2)) - A(2,0)*(A(2,3)*A(3,3) - A(4,3)*A(5,3)) - A(2,0)*A(3,0) - A(3,0)*(A(2,1)*A(3,2) + A(2,2)*A(3,1) - A(4,1)*A(5,2) - A(4,2)*A(5,1));
    C(5,7) = A(4,0)*A(5,4) - A(4,4)*(A(2,1)*A(3,3) + A(2,3)*A(3,1) - A(4,1)*A(5,3) - A(4,3)*A(5,1)) - A(5,4)*(A(2,2)*A(3,3) + A(2,3)*A(3,2) - A(4,2)*A(5,3) - A(4,3)*A(5,2)) - A(0,4)*(A(2,1)*A(3,1) - A(4,1)*A(5,1)) - A(1,4)*(A(2,2)*A(3,2) - A(4,2)*A(5,2)) - A(2,4)*(A(2,3)*A(3,3) - A(4,3)*A(5,3)) - A(2,0)*A(3,4) - A(2,4)*A(3,0) - A(3,4)*(A(2,1)*A(3,2) + A(2,2)*A(3,1) - A(4,1)*A(5,2) - A(4,2)*A(5,1)) + A(4,4)*A(5,0);
    C(5,8) = A(4,4)*A(5,4) - A(2,4)*A(3,4);
}